/**
 * 
 */
package name.marz.to.go.btree.ui.swing;

import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JTextField;

/**
 * @author masaru-gotou
 *
 */
public class SnapControlPanel extends JPanel {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JTextField snapNo;
	private JButton btnSnap;
	private JButton btnPrev;
	private JButton btnNext;
	
	public SnapControlPanel() {
		snapNo = new JTextField(5);
		snapNo.setToolTipText("Current Snapshot No");
		snapNo.setEditable(false);
		btnSnap = new JButton("Snap");
		btnPrev = new JButton("Prev");
		btnNext = new JButton("Next");
		
		add(snapNo);
		add(btnSnap);
		add(btnPrev);
		add(btnNext);
	}
	public String getSnapNo() {
		return snapNo.getText();
	}
	public void addSnapActionListener(ActionListener l) {
		btnSnap.addActionListener(l);
	}
	public void addPrevActionListener(ActionListener l) {
		btnPrev.addActionListener(l);
	}
	public void addNextActionListener(ActionListener l) {
		btnNext.addActionListener(l);
	}

}
